package org.htmlparser.util;

class CharacterReferenceEx extends CharacterReference
{
  protected int mEnd;
  protected int mStart;

  public CharacterReferenceEx()
  {
    super("", 0);
  }

  public int compare(Object paramObject)
  {
    int i = 0;
    String str = ((CharacterReference)paramObject).getKernel();
    int j = str.length();
    int k = this.mStart;
    int l = 0;
    while (true)
    {
      if (k < this.mEnd)
      {
        if (l < j)
          break label45;
        i = 1;
      }
      do
      {
        return i;
        label45: i = this.mKernel.charAt(k) - str.charAt(l);
      }
      while (i != 0);
      ++k;
      ++l;
    }
  }

  public String getKernel()
  {
    return this.mKernel.substring(this.mStart, this.mEnd);
  }

  public void setEnd(int paramInt)
  {
    this.mEnd = paramInt;
  }

  public void setStart(int paramInt)
  {
    this.mStart = paramInt;
  }
}